using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace Zjh
{
    /// <summary>
    /// generate by msg tool
    /// 请求下注结果
    /// </summary>
	public class ResBetMsg : ResMessage
	{
		//玩家id
		public long playerId;
		//筹码
		public long cedit;
		//0:暗注,非0:明注
		public int type;
		//下一个操作玩家id
		public long nextOptPlayerId;

        public ResBetMsg() { }

        public ResBetMsg(long playerId, long cedit, int type, long nextOptPlayerId)
        {
            this.playerId = playerId;
            this.cedit = cedit;
            this.type = type;
            this.nextOptPlayerId = nextOptPlayerId;
        }

        
		public void write(object obj)
		{
            ByteBuffer b = obj as ByteBuffer;
			b.PushLong(playerId);
			b.PushLong(cedit);
			b.PushInt(type);
			b.PushLong(nextOptPlayerId);
			
		}

	    public void read(object obj)
		{
            MyConverter b = obj as MyConverter;
			playerId = b.toInt64();
			cedit = b.toInt64();
			type = b.toInt32();
			nextOptPlayerId = b.toInt64();
			
		}

		public int Id
		{
            get { return 519219; }
		}

        public String Desc
        {
            get { return "请求下注结果"; }
        }
	}
}